unit fWaterMeterSummarize;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, ComCtrls, RzDTP, StdCtrls, Mask, RzEdit, DateUtils,
  uCommonFunc, uVar;

type
  TfrmWaterMeterSummarize = class(TForm)
    grp1: TGroupBox;
    lbl7: TLabel;
    rznbredtParentReading: TRzNumericEdit;
    lbl8: TLabel;
    lbl19: TLabel;
    rzdtmpckrParentReadDate: TRzDateTimePicker;
    lbl20: TLabel;
    rzdtmpckrParentReadFrom: TRzDateTimePicker;
    rzdtmpckrParentReadTo: TRzDateTimePicker;
    lbl1: TLabel;
    grp2: TGroupBox;
    lbl22: TLabel;
    rzdtmpckrReadDate: TRzDateTimePicker;
    lbl23: TLabel;
    rzdtmpckrReadFrom: TRzDateTimePicker;
    rzdtmpckrReadTo: TRzDateTimePicker;
    pnl1: TPanel;
    lbl2: TLabel;
    btnOK: TButton;
    btnCancel: TButton;
    mmoComments: TMemo;
    procedure btnOKClick(Sender: TObject);
    procedure btnCancelClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmWaterMeterSummarize: TfrmWaterMeterSummarize;

implementation

{$R *.dfm}

procedure TfrmWaterMeterSummarize.btnOKClick(Sender: TObject);
begin
  ModalResult := mrOk;
end;

procedure TfrmWaterMeterSummarize.btnCancelClick(Sender: TObject);
begin
  ModalResult := mrCancel;
end;

procedure TfrmWaterMeterSummarize.FormCreate(Sender: TObject);
begin
  rznbredtParentReading.Value := 0;
//  rznbredtParentPrice.Value := 0;
//  rzdtmpckrParentReadDate.Date := Date;
  GC_SetRZDateTime(rzdtmpckrParentReadDate, gsWorkDate);
//  rzdtmpckrParentReadFrom.Date := StartOfTheMonth(Date);
  GC_SetRZDateTime(rzdtmpckrParentReadFrom, StartOfTheMonth(StrToDate(gsWorkDate)));
//  rzdtmpckrParentReadTo.Date := EndOfTheMonth(Date);
  GC_SetRZDateTime(rzdtmpckrParentReadTo, EndOfTheMonth(StrToDate(gsWorkDate)));
//  rzdtmpckrReadDate.Date := Date;
  GC_SetRZDateTime(rzdtmpckrReadDate, gsWorkDate);
//  rzdtmpckrReadFrom.Date := StartOfTheMonth(Date);
  GC_SetRZDateTime(rzdtmpckrReadFrom, StartOfTheMonth(StrToDate(gsWorkDate)));
//  rzdtmpckrReadTo.Date := EndOfTheMonth(Date);
  GC_SetRZDateTime(rzdtmpckrReadTo, EndOfTheMonth(StrToDate(gsWorkDate)));
end;

end.
